package cz.anime.ppro.repositories;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

import cz.anime.ppro.model.Fragment;

public interface FragmentRepository extends JpaRepository<Fragment, Integer> {

	/*
	 * @Query("SELECT p FROM Person p WHERE LOWER(p.lastName) = LOWER(:lastName)")
   		public List<Person> find(@Param("lastName") String lastName);
	 * 
	 */
	
	@Query("SELECT f FROM Fragment f WHERE f.id = :id")
	public Fragment getFragment(@Param("id") int id);
	
	public Fragment findById(int id);
}
